home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / WASTE 1.0a4 Distribution / Interfaces 2 / QDOffscreen.p < prev    next >
Text File  |  1993-12-11  |  4KB  |  155 lines

  1. unit QDOffscreen;
  2.  
  3. { Pascal Interface to the Macintosh Libraries }
  4. { Copyright © 1985-1990 Apple Computer, Inc. }
  5.  
  6. { Non-Standard Version }
  7. { ANTI© 1993 Merzwaren }
  8.  
  9. interface
  10.  
  11.     const
  12.  
  13. { new error codes }
  14.  
  15.         cDepthErr = -157;   { invalid pixel depth }
  16.  
  17. { bit equates for the GWorld flags }
  18.  
  19.         pixPurgeBit = 0;
  20.         noNewDeviceBit = 1;
  21.         useTempMemBit = 2;
  22.         keepLocalBit = 3;
  23.         pixelsPurgeableBit = 6;
  24.         pixelsLockedBit = 7;
  25.         mapPixBit = 16;
  26.         newDepthBit = 17;
  27.         alignPixBit = 18;
  28.         newRowBytesBit = 19;
  29.         reallocPixBit = 20;
  30.         clipPixBit = 28;
  31.         stretchPixBit = 29;
  32.         ditherPixBit = 30;
  33.         gwFlagErrBit = 31;
  34.  
  35. { bit masks for setting the above bits }
  36.  
  37.         gwPixPurge = $00000001;
  38.         gwNoNewDevice = $00000002;
  39.         gwUseTempMem = $00000004;
  40.         gwKeepLocal = $00000008;
  41.         gwPixelsPurgeable = $00000040;
  42.         gwPixelsLocked = $00000080;
  43.         gwMapPix = $00010000;
  44.         gwNewDepth = $00020000;
  45.         gwAlignPix = $00040000;
  46.         gwNewRowBytes = $00080000;
  47.         gwReallocPix = $00100000;
  48.         gwClipPix = $10000000;
  49.         gwStretchPix = $20000000;
  50.         gwDitherPix = $40000000;
  51.         gwFlagErr = $80000000;
  52.  
  53.  
  54.     type
  55.  
  56.         GWorldFlags = LongInt;
  57.  
  58.         GWorldPtr = CGrafPtr;
  59.  
  60.  
  61.     function NewGWorld (var offscreenGWorld: GWorldPtr;
  62.                                     PixelDepth: INTEGER;
  63.                                     boundsRect: Rect;
  64.                                     cTable: CTabHandle;
  65.                                     aGDevice: GDHandle;
  66.                                     flags: GWorldFlags): QDErr;
  67.     inline
  68.         $203C, $0016, $0000, $AB1D;
  69.     function LockPixels (pm: PixMapHandle): BOOLEAN;
  70.     inline
  71.         $203C, $0004, $0001, $AB1D;
  72.     procedure UnlockPixels (pm: PixMapHandle);
  73.     inline
  74.         $203C, $0004, $0002, $AB1D;
  75.     function UpdateGWorld (var offscreenGWorld: GWorldPtr;
  76.                                     pixelDepth: INTEGER;
  77.                                     boundsRect: Rect;
  78.                                     cTable: CTabHandle;
  79.                                     aGDevice: GDHandle;
  80.                                     flags: GWorldFlags): GWorldFlags;
  81.     inline
  82.         $203C, $0016, $0003, $AB1D;
  83.     procedure DisposeGWorld (offscreenGWorld: GWorldPtr);
  84.     inline
  85.         $203C, $0004, $0004, $AB1D;
  86.     procedure GetGWorld (var port: CGrafPtr;
  87.                                     var gdh: GDHandle);
  88.     inline
  89.         $203C, $0008, $0005, $AB1D;
  90.     procedure SetGWorld (port: CGrafPtr;
  91.                                     gdh: GDHandle);
  92.     inline
  93.         $203C, $0008, $0006, $AB1D;
  94.     procedure CTabChanged (ctab: CTabHandle);
  95.     inline
  96.         $203C, $0004, $0007, $AB1D;
  97.     procedure PixPatChanged (ppat: PixPatHandle);
  98.     inline
  99.         $203C, $0004, $0008, $AB1D;
  100.     procedure PortChanged (port: GrafPtr);
  101.     inline
  102.         $203C, $0004, $0009, $AB1D;
  103.     procedure GDeviceChanged (gdh: GDHandle);
  104.     inline
  105.         $203C, $0004, $000A, $AB1D;
  106.     procedure AllowPurgePixels (pm: PixMapHandle);
  107.     inline
  108.         $203C, $0004, $000B, $AB1D;
  109.     procedure NoPurgePixels (pm: PixMapHandle);
  110.     inline
  111.         $203C, $0004, $000C, $AB1D;
  112.     function GetPixelsState (pm: PixMapHandle): GWorldFlags;
  113.     inline
  114.         $203C, $0004, $000D, $AB1D;
  115.     procedure SetPixelsState (pm: PixMapHandle;
  116.                                     state: GWorldFlags);
  117.     inline
  118.         $203C, $0008, $000E, $AB1D;
  119.     function GetPixBaseAddr (pm: PixMapHandle): Ptr;
  120.     inline
  121.         $203C, $0004, $000F, $AB1D;
  122.     function NewScreenBuffer (globalRect: Rect;
  123.                                     purgeable: BOOLEAN;
  124.                                     var gdh: GDHandle;
  125.                                     var offscreenPixMap: PixMapHandle): QDErr;
  126.     inline
  127.         $203C, $000E, $0010, $AB1D;
  128.     procedure DisposeScreenBuffer (offscreenPixMap: PixMapHandle);
  129.     inline
  130.         $203C, $0004, $0011, $AB1D;
  131.     function GetGWorldDevice (offscreenGWorld: GWorldPtr): GDHandle;
  132.     inline
  133.         $203C, $0004, $0012, $AB1D;
  134.     function QDDone (port: GrafPtr): BOOLEAN;
  135.     inline
  136.         $203C, $0004, $0013, $AB1D;
  137.     function OffscreenVersion: LONGINT;
  138.     inline
  139.         $7014, $AB1D;
  140.     function NewTempScreenBuffer (globalRect: Rect;
  141.                                     purgeable: BOOLEAN;
  142.                                     var gdh: GDHandle;
  143.                                     var offscreenPixMap: PixMapHandle): QDErr;
  144.     inline
  145.         $203C, $000E, $0015, $AB1D;
  146.     function PixMap32Bit (pmHandle: PixMapHandle): BOOLEAN;
  147.     inline
  148.         $203C, $0004, $0016, $AB1D;
  149.     function GetGWorldPixMap (offscreenGWorld: GWorldPtr): PixMapHandle;
  150.     inline
  151.         $203C, $0004, $0017, $AB1D;
  152.  
  153.  
  154. implementation
  155. end.